-- generate T-SQL to discover/drop all foreign keys
SET IMPLICIT_TRANSACTIONS OFF
SELECT
	referenced_table= OBJECT_NAME(referenced_object_id),
	parent_table	= OBJECT_NAME(parent_object_id),
	fk_name			= [name],
	tsql_command	= 'ALTER TABLE [' + OBJECT_NAME(parent_object_id) + '] DROP CONSTRAINT [' + [name] + ']'
  FROM sys.foreign_keys
--WHERE referenced_object_id = OBJECT_ID('')
  ORDER BY 1,2
GO